<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>dc-example</title>
    <script src="/libs/dc-sdk/dc.min.js"></script>
    <link href="/libs/dc-sdk/dc.min.css" type="text/css" rel="stylesheet" />
    <link href="../index.css" type="text/css" rel="stylesheet" />
  </head>

  <body>
    <div id="viewer-container" class="viewer-container"></div>
    <script>
      DC.config.baseUrl = '../libs/dc-sdk/resources/'
      let viewer = new DC.Viewer('viewer-container')

      let baseLayer = DC.ImageryLayerFactory.createImageryLayer(
        DC.ImageryType.AMAP
      )
      viewer.addBaseLayer(baseLayer, {
        iconUrl: '../assets/icon/elec.png',
        name: '电子',
      })

      let baseLayer_img = DC.ImageryLayerFactory.createImageryLayer(
        DC.ImageryType.AMAP,
        {
          style: 'img',
        }
      )
      viewer.addBaseLayer(baseLayer_img, {
        iconUrl: '../assets/icon/img.png',
        name: '影像',
      })

      let baseLayer_cva = DC.ImageryLayerFactory.createImageryLayer(
        DC.ImageryType.AMAP,
        {
          style: 'cva',
        }
      )
      viewer.addBaseLayer([baseLayer_img, baseLayer_cva], {
        iconUrl: '../assets/icon/img.png',
        name: '影像+注记',
      })

      viewer.zoomToPosition(
        new DC.Position(105.565571, 31.984708, 15362816, 0, -90)
      )
    </script>
  </body>
</html>
